package com.zzti.sys.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zzti.pay.wechat.pay.H5Pay;

@Service
public class WeChatPayService {
	@Autowired
	H5Pay h5Pay;

	// 调用统一下单接口
	public String topay(String outTradeNo, String totalFee, String body, String IP) {
		Map<String, String> data = h5Pay.createOrder(outTradeNo, totalFee, body, IP);
		return h5Pay.toPay(data);
	}

	// 微信回调接口
	public String notify(Map<String, String> responseData) {
		return h5Pay.notify(responseData);
	}
}
